package com.jkt.rms.business.base;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;


/**
 * This is an object that contains data related to the Project table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="Project"
 */
public abstract class BaseProject  implements Serializable {

	private static final long serialVersionUID = 123232454543L;
	public static String PROP_STATUS = "status";
	public static String PROP_PROJECT_EXPECTED_END_DATE = "projectExpectedEndDate";
	public static String PROP_UPDATED_DATE = "updatedDate";
	public static String PROP_PROJECT_NAME = "projectName";
	public static String PROP_UPDATED_BY = "updatedBy";
	public static String PROP_PROJECT_ACTUAL_START_DATE = "projectActualStartDate";
	public static String PROP_PROJECT_DESCRIPTION = "projectDescription";
	public static String PROP_CREATE_DATE = "createdDate";
	public static String PROP_PROJECT_EXPECTED_START_DATE = "projectExpectedStartDate";
	public static String PROP_PROJECT_TYPE = "projectType";
	public static String PROP_PROJECT_ACTUAL_END_DATE = "projectActualEndDate";
	public static String PROP_CREATE_BY = "createdBy";
	public static String PROP_ID = "id";
	public static String PROP_PROJECT_NUMBER = "projectNumber";
	public static String PROP_PURCHASE_ORDER_NO = "purchaseOrderNo";
	public static String PROP_PROJECT_MANAGER = "projectManager";
	public static String PROP_DELIVERY_MANAGER = "deliveryManager";
	public static String PROP_COST_CENTRE = "costCentre";
	public static String PROP_LINE_OF_BUSINESS = "lineOfBusiness";


	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private int id;

	// fields
	private String projectName;
	private String projectDescription;
	private Timestamp projectExpectedStartDate;
	private Timestamp projectExpectedEndDate;
	private Timestamp projectActualStartDate;
	private Timestamp projectActualEndDate;
	private String projectType;
	private String createdBy;
	private Timestamp createdDate;
	private String updatedBy;
	private Timestamp updatedDate;
	private char status;
	private String purchaseOrderNo;
	private String projectManager;
	private String deliveryManager;
	private long costCentre;
	private String lineOfBusiness;
	private String projectNumber;
	

	// collections
//	private Set<Object> project;


	// constructors
	public BaseProject () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseProject (int id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseProject (
		int id,
		String projectName,
		String projectType,
		String createdBy,
		Timestamp createdDate,
		String updatedBy,
		Timestamp updatedDate,
		char status,
		String purchaseOrderNo,
		String projectManager,
		String deliveryManager,
		long costCentre,
		String lineOfBusiness,
		String projectNumber
) {

		this.setId(id);
		this.setProjectName(projectName);
		this.setProjectType(projectType);
		this.setcreatedBy(createdBy);
		this.setcreatedDate(createdDate);
		this.setUpdatedBy(updatedBy);
		this.setUpdatedDate(updatedDate);
		this.setStatus(status);
		this.setPurchaseOrderNo(purchaseOrderNo);
		this.setProjectManager(projectManager);
		this.setDeliveryManager(deliveryManager);
		this.setCostCentre(costCentre);
		this.setLineOfBusiness(lineOfBusiness);
		this.setProjectNumber(projectNumber);
		initialize();
	}

	protected void initialize () {}



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  column="project_number"
     */
	public int getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	private void setId (int id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}


	public String getProjectNumber() {
		return projectNumber;
	}

	public void setProjectNumber(String projectNumber) {
		this.projectNumber = projectNumber;
	}

	/**
	 * Return the value associated with the column: project_name
	 */
	public String getProjectName () {
		return projectName;
	}

	/**
	 * Set the value related to the column: project_name
	 * @param projectName the project_name value
	 */
	public void setProjectName (String projectName) {
		this.projectName = projectName;
	}


	/**
	 * Return the value associated with the column: project_description
	 */
	public String getProjectDescription () {
		return projectDescription;
	}

	/**
	 * Set the value related to the column: project_description
	 * @param projectDescription the project_description value
	 */
	public void setProjectDescription (String projectDescription) {
		this.projectDescription = projectDescription;
	}


	/**
	 * Return the value associated with the column: project_expected_start_date
	 */
	public Timestamp getProjectExpectedStartDate () {
		return projectExpectedStartDate;
	}

	/**
	 * Set the value related to the column: project_expected_start_date
	 * @param projectExpectedStartDate the project_expected_start_date value
	 */
	public void setProjectExpectedStartDate (Timestamp projectExpectedStartDate) {
		this.projectExpectedStartDate = projectExpectedStartDate;
	}


	/**
	 * Return the value associated with the column: project_expected_end_date
	 */
	public Timestamp getProjectExpectedEndDate () {
		return projectExpectedEndDate;
	}

	/**
	 * Set the value related to the column: project_expected_end_date
	 * @param projectExpectedEndDate the project_expected_end_date value
	 */
	public void setProjectExpectedEndDate (Timestamp projectExpectedEndDate) {
		this.projectExpectedEndDate = projectExpectedEndDate;
	}


	/**
	 * Return the value associated with the column: project_actual_start_date
	 */
	public Timestamp getProjectActualStartDate () {
		return projectActualStartDate;
	}

	/**
	 * Set the value related to the column: project_actual_start_date
	 * @param projectActualStartDate the project_actual_start_date value
	 */
	public void setProjectActualStartDate (Timestamp projectActualStartDate) {
		this.projectActualStartDate = projectActualStartDate;
	}


	/**
	 * Return the value associated with the column: project_actual_end_date
	 */
	public Timestamp getProjectActualEndDate () {
		return projectActualEndDate;
	}

	/**
	 * Set the value related to the column: project_actual_end_date
	 * @param projectActualEndDate the project_actual_end_date value
	 */
	public void setProjectActualEndDate (Timestamp projectActualEndDate) {
		this.projectActualEndDate = projectActualEndDate;
	}


	/**
	 * Return the value associated with the column: project_type
	 */
	public String getProjectType () {
		return projectType;
	}

	/**
	 * Set the value related to the column: project_type
	 * @param projectType the project_type value
	 */
	public void setProjectType (String projectType) {
		this.projectType = projectType;
	}


	/**
	 * Return the value associated with the column: create_by
	 */
	public String getcreatedBy () {
		return createdBy;
	}

	/**
	 * Set the value related to the column: create_by
	 * @param createdBy the create_by value
	 */
	public void setcreatedBy (String createdBy) {
		this.createdBy = createdBy;
	}


	/**
	 * Return the value associated with the column: created_date
	 */
	public Timestamp getcreatedDate () {
		return createdDate;
	}

	/**
	 * Set the value related to the column: created_date
	 * @param createdDate the created_date value
	 */
	public void setcreatedDate (Timestamp createdDate) {
		this.createdDate = createdDate;
	}


	/**
	 * Return the value associated with the column: updated_by
	 */
	public String getUpdatedBy () {
		return updatedBy;
	}

	/**
	 * Set the value related to the column: updated_by
	 * @param updatedBy the updated_by value
	 */
	public void setUpdatedBy (String updatedBy) {
		this.updatedBy = updatedBy;
	}


	/**
	 * Return the value associated with the column: updated_date
	 */
	public Timestamp getUpdatedDate () {
		return updatedDate;
	}

	/**
	 * Set the value related to the column: updated_date
	 * @param updatedDate the updated_date value
	 */
	public void setUpdatedDate (Timestamp updatedDate) {
		this.updatedDate = updatedDate;
	}


	/**
	 * Return the value associated with the column: status
	 */
	public char getStatus () {
		return status;
	}

	/**
	 * Set the value related to the column: status
	 * @param status the status value
	 */
	public void setStatus (char status) {
		this.status = status;
	}


	/**
	 * Return the value associated with the column: Project
	 */
//	public Set<Object> getProject () {
//		return this.project;
//	}

	/**
	 * Set the value related to the column: Project
	 * @param project the Project value
	 */
//	public void setProject (Set<Object> project) {
//		this.project = project;
//	}
//	
//	public void addToProject (Object obj) {
//		if (null == this.project) this.project = new HashSet<Object>();
//		this.project.add(obj);
//	}

	public String getPurchaseOrderNo() {
		return purchaseOrderNo;
	}

	public void setPurchaseOrderNo(String purchaseOrderNo) {
		this.purchaseOrderNo = purchaseOrderNo;
	}

	public String getProjectManager() {
		return projectManager;
	}

	public void setProjectManager(String projectManager) {
		this.projectManager = projectManager;
	}

	public String getDeliveryManager() {
		return deliveryManager;
	}

	public void setDeliveryManager(String deliveryManager) {
		this.deliveryManager = deliveryManager;
	}

	public long getCostCentre() {
		return costCentre;
	}

	public void setCostCentre(long costCentre) {
		this.costCentre = costCentre;
	}

	public String getLineOfBusiness() {
		return lineOfBusiness;
	}

	public void setLineOfBusiness(String lineOfBusiness) {
		this.lineOfBusiness = lineOfBusiness;
	}

	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jkt.rms.business.base.BaseProject)) return false;
		else {
			com.jkt.rms.business.base.BaseProject mObj = (com.jkt.rms.business.base.BaseProject) obj;
			return (this.getId() == mObj.getId());
		}
	}


	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
				this.hashCode = this.getId();
			}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}

}